package com.cn.mmd.service;

import com.cn.mmd.mapper.AnswerMapper;
import com.cn.mmd.mapper.IssueMapper;
import com.cn.mmd.model.Answer;
import com.cn.mmd.model.Issue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/7/19 0019.
 */
@Service("issueStudentService")
public class IssueStudentServiceImpl implements  IssueStudentService {

    @Autowired
    private IssueMapper issueMapper;

    @Autowired
    private AnswerMapper answerMapper;

    @Override
    public int insertSelective(Issue record) {
        return issueMapper.insertSelective(record);
    }

    @Override
    public Issue selectByUrl(Issue issue) {
        return issueMapper.selectByUrl(issue);
    }

    @Override
    public List<Issue> selectAllByOd(Issue issue) {
        return issueMapper.selectAllByOd(issue);
    }

    @Override
    public List<Answer> selectByIssueIdOd(Answer answer) {
        return answerMapper.selectByIssueIdOd(answer);
    }

    @Override
    public Answer selectByUrl(Answer answer) {
        return answerMapper.selectByUrl(answer);
    }

    @Override
    public int insertSelective(Answer answer) {
        return answerMapper.insertSelective(answer);
    }

    @Override
    public int updateByPrimaryKeySelective(Issue record) {
        return issueMapper.updateByPrimaryKeySelective(record);
    }
    @Override
    public int updateByPrimaryKeySelective(Answer answer) {
        return answerMapper.updateByPrimaryKeySelective(answer);
    }

    @Override
    public int countNumByIssueId(Answer answer) {
        return answerMapper.countNumByIssueId(answer);
    }

    @Override
    public Issue selectByPrimaryKey(Integer issueid) {
        return issueMapper.selectByPrimaryKey(issueid);
    }
}
